package com.weixing.mall.provider.controller.front;

import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.base.wrapper.ResultUtil;
import com.weixing.mall.core.support.BaseController;
import com.weixing.mall.provider.api.model.vo.SysDictVo;
import com.weixing.mall.provider.service.IDictService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author wx
 * @Date 2020/1/11 17:34
 * @Version 1.0
 */
@RestController
@RequestMapping("front/dict")
@Api(value = "前端:数据字典Api",tags = "前端:数据字典")
public class FrontDictController extends BaseController {

    @Autowired
    private IDictService dictService;
    @ApiOperation(value = "根据字典编码查询")
    @GetMapping("getDictByCode")
    public Result<List<SysDictVo>> getDictByCode(String dictGroupCode) {
        List<SysDictVo> list = dictService.getDictByCode(dictGroupCode);
        return  ResultUtil.success(list);
    }


}
